package com.bwie.bwedu.presenter.impl;

import com.bwie.bwedu.activity.MainActivity;
import com.bwie.bwedu.model.DAiLiModel;
import com.bwie.bwedu.model.impl.DaiLiImpl;
import com.bwie.bwedu.presenter.GetDaiLiPresenter;

/**
 * Created by 沫沫~ on 2016/7/25.
 */
public class GetDaiLiImpl implements GetDaiLiPresenter {

	private MainActivity mainActivity;
	private final DaiLiImpl daiLi;

	public GetDaiLiImpl(MainActivity mainActivity) {
		this.mainActivity = mainActivity;
		daiLi = new DaiLiImpl();
	}

	@Override
	public void getDaili() {
		daiLi.daiLi(mainActivity, new DAiLiModel.Agentistener() {
			@Override
			public void onGetAgentSuccess(String s) {
				mainActivity.onSuccess(s);
			}

			@Override
			public void onGetAgentFail() {
				mainActivity.onFail();
			}
		});

	}
}
